Skip to content

Conversation

@SebastianZ
Copy link
Contributor

This defines the @supports-query at-rule that allows authors to create custom support queries. It closes #12622.

Note that the resolution was to add it to the same spec as @custom-media, i.e. Media Queries 5. Though, as noted in #12622 (comment), it is strongly tied to @supports. Therefore, I've added it to CSS Conditional 5, instead.

Sebastian

@LeaVerou
Copy link
Member

LeaVerou commented Oct 13, 2025

I thought @supports-condition was a more well-liked name (and certainly how I've seen it referenced in other contexts).

@mirisuzanne
Copy link
Contributor

@supports-condition is also the name used in the examples here. Whichever spelling is used, the spec should be internally consistent. 😅

@SebastianZ SebastianZ force-pushed the custom-supports-queries branch 2 times, most recently from 2ef2884 to 0fe9cfa Compare October 13, 2025 19:21
@SebastianZ
Copy link
Contributor Author

@supports-condition is also the name used in the examples here. Whichever spelling is used, the spec should be internally consistent. 😅

Oops, copy & pasta. 😅 I had first copied Lea's example and then changed the contents but not the name, while in the definition I chose "query", as that seems a little more consistent with "supports queries" and "media queries" and was also suggested by Lea.

Anyway, I changed it to "supports condition" for now including all the related text. The PR includes an issue to bikeshed the name, anyway.

@LeaVerou @mirisuzanne Could you please review the changes?

Sebastian

@SebastianZ SebastianZ changed the title [css-conditional-5] Defined @supports-query #12622 [css-conditional-5] Defined @supports-condition #12622 Oct 14, 2025
@SebastianZ SebastianZ force-pushed the custom-supports-queries branch from c97ea03 to fa593d3 Compare October 15, 2025 21:21
@SebastianZ
Copy link
Contributor Author

As noted in #12945, I had to rebase this PR. Therefore, re-requesting review.

Sebastian

@SebastianZ SebastianZ requested a review from svgeesus October 15, 2025 21:36
@svgeesus
Copy link
Contributor

Approved, but not merging yet in case @LeaVerou @mirisuzanne have further comments.

Copy link
Contributor

@mirisuzanne mirisuzanne left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

looks good to me

@SebastianZ SebastianZ merged commit 136029a into w3c:main Oct 17, 2025
1 check passed
@SebastianZ
Copy link
Contributor Author

Thanks! Merging.

@dbaron
Copy link
Member

dbaron commented Oct 20, 2025

[ moved to issue instead of here ]

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

css-conditional-5 Current Work

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[css-conditional] @supports-condition, for larger feature queries and named reuse

5 participants